import request from '@/utils/request';
import qs from 'qs';
import type { PageResult, ResponseData } from '../typing';
// 参数接口
export interface CreateMedicalBasicDepartment_1Params {
    /*楼层ID */
    buildingId: number;
    /*科室名称 */
    deptName: string;
    /*科室负责人 */
    deptCharge: string;
    /*科室电话 */
    deptTel: string;
}
/**
 * 创建科室
 * @param {object} params 管理后台 - 陪护科室创建 Request VO
 * @param {number} params.buildingId 楼层ID
 * @param {string} params.deptName 科室名称
 * @param {string} params.deptCharge 科室负责人
 * @param {string} params.deptTel 科室电话
 * @returns
 */
export function createMedicalBasicDepartment(params: CreateMedicalBasicDepartment_1Params): Promise<ResponseData<any>> {
    return request.post(`/yfwy/caregiver-department`, params);
}
// 参数接口
export interface UpdateMedicalBasicDepartment_1Params {
    /*楼层ID */
    buildingId: number;
    /*科室名称 */
    deptName: string;
    /*科室负责人 */
    deptCharge: string;
    /*科室电话 */
    deptTel: string;
    /*主键 */
    id: number;
}
/**
 * 更新科室
 * @param {object} params 管理后台 - 陪护科室更新 Request VO
 * @param {number} params.buildingId 楼层ID
 * @param {string} params.deptName 科室名称
 * @param {string} params.deptCharge 科室负责人
 * @param {string} params.deptTel 科室电话
 * @param {number} params.id 主键
 * @returns
 */
export function updateMedicalBasicDepartment(params: UpdateMedicalBasicDepartment_1Params): Promise<ResponseData<any>> {
    return request.put(`/yfwy/caregiver-department`, params);
}
// 参数接口
export interface GetMedicalBasicDepartmentPage_1Params {
    /*当前第几页(默认1) */
    current?: number;
    /*每页条数(默认20) */
    size?: number;
    /*楼层IDs */
    buildingIds: Record<string, unknown>[];
    /*科室名称 */
    deptName?: string;
    /* */
    page?: {
        /* */
        records?: {
            /* */
            createTime?: string;
            /* */
            updateTime?: string;
            /* */
            creator?: Record<string, unknown>;
            /* */
            updater?: Record<string, unknown>;
            /*主键 */
            id?: Record<string, unknown>;
            /*项目code */
            projectCode?: string;
            /*楼层ID */
            buildingId?: Record<string, unknown>;
            /*科室名称 */
            deptName?: string;
            /*科室负责人 */
            deptCharge?: string;
            /*科室电话 */
            deptTel?: string;
            /*二维码地址 */
            qrcodeUrl?: string;
            /*全名称 */
            fullName?: string;
        }[];
        /* */
        total?: Record<string, unknown>;
        /* */
        size?: Record<string, unknown>;
        /* */
        current?: Record<string, unknown>;
        /* */
        orders?: {
            /* */
            column?: string;
            /* */
            asc?: boolean;
        }[];
        /* */
        optimizeCountSql?: boolean;
        /* */
        searchCount?: boolean;
        /* */
        optimizeJoinOfCountSql?: boolean;
        /* */
        maxLimit?: Record<string, unknown>;
        /* */
        countId?: string;
        /* */
        pages?: Record<string, unknown>;
    };
}
// 响应接口
export interface GetMedicalBasicDepartmentPage_1Res {
    /* */
    code: number;
    /* */
    data: {
        /* */
        size: number;
        /* */
        total: number;
        /* */
        current: number;
        /* */
        records: {
            /* */
            createTime: Record<string, unknown>;
            /* */
            updateTime: Record<string, unknown>;
            /* */
            creator: number;
            /* */
            updater: number;
            /*主键 */
            id: number;
            /*项目code */
            projectCode: string;
            /*楼层ID */
            buildingId: number;
            /*科室名称 */
            deptName: string;
            /*科室负责人 */
            deptCharge: string;
            /*科室电话 */
            deptTel: string;
            /*二维码地址 */
            qrcodeUrl: string;
            /*全名称 */
            fullName: string;
        }[];
        /* */
        pages: number;
    };
    /* */
    msg: string;
}
/**
 * 获得科室分页
 * @param {object} params 管理后台 - 陪护科室分页 Request VO
 * @param {number} params.current 当前第几页(默认1)
 * @param {number} params.size 每页条数(默认20)
 * @param {array} params.buildingIds 楼层IDs
 * @param {string} params.deptName 科室名称
 * @param {object} params.page
 * @returns
 */
export function getMedicalBasicDepartmentPage(params: GetMedicalBasicDepartmentPage_1Params): Promise<GetMedicalBasicDepartmentPage_1Res> {
    return request.post(`/yfwy/caregiver-department/page`, params);
}

// 参数接口
export interface CreateMedicalBasicBuilding_1Params {
    /*项目code */
    projectCode: string;
    /*楼栋名 */
    name: string;
    /*楼层(开始层) */
    from: number;
    /*楼层(结束层) */
    to: number;
}
/**
 * 创建楼层
 * @param {object} params YfwyMedicalCaregiverBasicBuildingCreateReqArgs
 * @param {string} params.projectCode 项目code
 * @param {string} params.name 楼栋名
 * @param {number} params.from 楼层(开始层)
 * @param {number} params.to 楼层(结束层)
 * @returns
 */
export function createMedicalBasicBuilding(params: CreateMedicalBasicBuilding_1Params): Promise<ResponseData<any>> {
    return request.post(`/yfwy/caregiver-department/building`, params);
}
// 响应接口
export interface GetMedicalBasicDepartment_1Res {
    /* */
    code: number;
    /* */
    data: {
        /* */
        createTime: Record<string, unknown>;
        /* */
        updateTime: Record<string, unknown>;
        /* */
        creator: number;
        /* */
        updater: number;
        /*主键 */
        id: number;
        /*项目code */
        projectCode: string;
        /*楼层ID */
        buildingId: number;
        /*科室名称 */
        deptName: string;
        /*科室负责人 */
        deptCharge: string;
        /*科室电话 */
        deptTel: string;
        /*二维码地址 */
        qrcodeUrl: string;
        /*全名称 */
        fullName: string;
    };
    /* */
    msg: string;
}
/**
 * 获得科室
 * @param {string} id
 * @returns
 */
export function getMedicalBasicDepartment(id: number): Promise<GetMedicalBasicDepartment_1Res> {
    return request.get(`/yfwy/caregiver-department/${id}`);
}
/**
 * 删除科室
 * @param {string} id
 * @returns
 */
export function deleteMedicalBasicDepartment(id: number): Promise<ResponseData<any>> {
    return request.delete(`/yfwy/caregiver-department/${id}`);
}

/**
 * 导出科室二维码
 * @param {array} params integer
 * @returns
 */
export function exportMedicalBasicDepartmentExcel(params: any[]): Promise<Blob> {
    return request.post(`/yfwy/caregiver-department/export`, params, {
        responseType: 'blob',
    });
}